package com.authine.cloudpivot.ext.enums.order;

/**
 * @author Kris
 */
public enum CartSrcEnum {
    /**
     * 购物车商品源
     */
    Sourcing("寻源"),
    Shop("商城");
    public String des;

    CartSrcEnum(String des) {
        this.des = des;
    }

    public static CartSrcEnum switchNew(Integer src) {
        if (src.equals(1) || src.equals(2) || src.equals(7) || src.equals(8)) {
            return CartSrcEnum.Shop;
        }

        if (src.equals(3) || src.equals(4)) {
            return CartSrcEnum.Sourcing;
        }

        return null;
    }
}
